]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Don't destroy FolderView directly
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 20 May 2020 19:22:36 +0000 (16:22 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 18 Jun 2020 13:32:01 +0000 (10:32 -0300)
When FolderIcon is destroyed, it destroyed the FolderView and, if
there's a folder dialog present, it destroys the dialog as well.

Turns out, the folder dialog adds the icon's FolderView to itself.
The view becomes part of the dialog's actor tree. When the dialog
is destroyed, it also tries to destroy the view - but the folder
view was already destroyed by FolderIcon!

Fix that by letting the dialog destroy the folder view if it exists,
otherwise destroy the folder view directly.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271

js/ui/appDisplay.js

index f50d9158cbe451ce0120557e5e1f1eb0b0ea83ba..76546c887f399810275b6b89c01fcbfb0dbd6c0a 100644 (file)
@@ -1175,15 +1175,15 @@ var FolderIcon = GObject.registerClass({
             this._dragMonitor = null;
         }
 
-        this.view.destroy();
+        if (this._dialog)
+            this._dialog.destroy();
+        else
+            this.view.destroy();
 
         if (this._folderChangedId) {
             this._folder.disconnect(this._folderChangedId);
             delete this._folderChangedId;
         }
-
-        if (this._dialog)
-            this._dialog.destroy();
     }
 
     vfunc_clicked() {